Page(global.connect(
  state => ({
    ...state.globalReducer,
    ...state.homeReducer,
    ...state.activityReducer
  }),
  dispatch => ({
    initHome(data) {
      dispatch(global.globalReducer.initGlobal(data))
    },
  })
)({
  data: {
    uiPageSize: 2,
    uiFnLock: false,
    uiLoading: false,
    uiList: [],
    uiCurrentPage: 0,
    uiTabIndex: 0,
    uiKeyword: '',
    uiShowSearch: false
  },
  onLoad() {
    console.log('page activity onLoad')
  },
  handleLicon1Tap(e) {
    console.log('handleLicon1Tap', e)
    wx.navigateBack()
  },
  handleRicon1Tap(e) {
    const uiShowSearch = !this.data.uiShowSearch
    this.setData({
      uiShowSearch
    })
  },
  handleTab(e) {
    this.setData({
      uiTabIndex: e.currentTarget.dataset.index
    })
  },
  handleSearchConfirm(e) {
    console.log('handleSearchConfirm', e)
    const uiKeyword = e.detail.detail.value
    this.setData({ uiKeyword })
    this.handleReloadListData(true)
  },
  handleItemTap(e) {
    console.log('handleItemTap', e)
    global.handleRoute({ route: 'order-detail' })
  },
  handleBtn1(e) {
    console.log('handleBtn1', e)
  },
  handleBtn2(e) {
    console.log('handleBtn2', e)
  },
  // 日历
  handleOpenCalendar(e) {
    console.log('handleCalendar', e)
    this.selectComponent('#calendar').handleShow(null, {
      title: '',
      range: false,
      startDate: this.data.uiStartDate
    })
  },
  handleCalendarHide(e) {
    console.log('handleCalendarHide', e)
    this.selectComponent('#calendar').handleHide(false)
  },
  handleCalendarConfirm(e) {
    console.log('handleCalendarConfirm', e)
    this.selectComponent('#calendar').handleHide(false)
  },
}))